package cn.yuanqiao.archive.appManager.domain;

import cn.yuanqiao.common.annotation.Excel;
import cn.yuanqiao.common.annotation.IdAnnotation;
import cn.yuanqiao.common.utils.StringUtils;
import cn.yuanqiao.common.core.domain.BaseEntity;
import cn.yuanqiao.common.utils.SecurityUtils;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

/**
 * 水印对象 YQSY
 * 
 * @author yuanqiao
 * @date 2023-06-16
 */
public class YqSy extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private final String BIGTABLENAME = "_YQSY";

    public YqSy() {
        String yqsyCode = SecurityUtils.getTenantCode();
        if(StringUtils.isEmpty(yqsyCode)){
//            throw new ServiceException("TenantCode is null");
            this.tableName = "YQSY";
        }else {
            this.tableName = yqsyCode.toUpperCase()+BIGTABLENAME;
        }
    }

    private String tableName;

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    /** ID */
    @IdAnnotation
    @JsonFormat(shape = JsonFormat.Shape.STRING)//转化成string传到前端
    private Long id;

    /** 是否启用 */
    @Excel(name = "是否启用")
    private Integer status;

    /** RGB值 */
    @Excel(name = "RGB值")
    private String color;

    /** 设置 */
    @Excel(name = "设置")
    private Integer setup;

    /** 水印内容 */
    @Excel(name = "水印内容")
    private String synr;

    /** 字体 */
    @Excel(name = "字体")
    private String font;

    /** 字号 */
    @Excel(name = "字号")
    private String fontsize;

    /** 透明度 */
    @Excel(name = "透明度")
    private Integer transparency;

    /** 多行水印 */
    @Excel(name = "多行水印")
    private Integer line;

    /** 旋转水印 */
    @Excel(name = "旋转水印")
    private Integer rotate;

    /** 创建人 */
    @Excel(name = "创建人")
    @JsonFormat(shape = JsonFormat.Shape.STRING)//转化成string传到前端
    private Long creatorId;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date create_time;

    /** 最后修改人 */
    @Excel(name = "最后修改人")
    private Long lastupdater;

    /** 最后修改时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后修改时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastupdateTime;

//    /** 动态水印显示方式 */
//    @Excel(name = "动态水印显示方式")
//    private Integer TRENDS;

    /** 是否删除 */
    @Excel(name = "是否删除")
    private Integer isDel;

    /** 水印代码 */
    @Excel(name = "水印代码")
    private String sydm;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public Integer getSetup() {
        return setup;
    }

    public void setSetup(Integer setup) {
        this.setup = setup;
    }

    public String getSynr() {
        return synr;
    }

    public void setSynr(String synr) {
        this.synr = synr;
    }

    public String getFont() {
        return font;
    }

    public void setFont(String font) {
        this.font = font;
    }

    public String getFontsize() {
        return fontsize;
    }

    public void setFontsize(String fontsize) {
        this.fontsize = fontsize;
    }

    public Integer getTransparency() {
        return transparency;
    }

    public void setTransparency(Integer transparency) {
        this.transparency = transparency;
    }

    public Integer getLine() {
        return line;
    }

    public void setLine(Integer line) {
        this.line = line;
    }

    public Integer getRotate() {
        return rotate;
    }

    public void setRotate(Integer rotate) {
        this.rotate = rotate;
    }

    public Long getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(Long creatorId) {
        this.creatorId = creatorId;
    }

    public Date getCreate_time() {
        return create_time;
    }

    public void setCreate_time(Date create_time) {
        this.create_time = create_time;
    }

    public Long getLastupdater() {
        return lastupdater;
    }

    public void setLastupdater(Long lastupdater) {
        this.lastupdater = lastupdater;
    }

    public void setLastupdateTime(Date lastupdateTime) {
        this.lastupdateTime = lastupdateTime;
    }

    public Date getLastupdateTime()
    {
        return lastupdateTime;
    }
//    public void setTRENDS(Integer TRENDS)
//    {
//        this.TRENDS = TRENDS;
//    }
//
//    public Integer getTRENDS()
//    {
//        return TRENDS;
//    }
    public void setIsDel(Integer isDel) 
    {
        this.isDel = isDel;
    }

    public Integer getIsDel() 
    {
        return isDel;
    }

    public String getSydm() {
        return sydm;
    }

    public void setSydm(String sydm) {
        this.sydm = sydm;
    }

    @Override
    public String toString() {
        return "YqSy{" +
                "tableName='" + tableName + '\'' +
                ", id=" + id +
                ", status=" + status +
                ", color='" + color + '\'' +
                ", setup=" + setup +
                ", synr='" + synr + '\'' +
                ", font='" + font + '\'' +
                ", fontsize='" + fontsize + '\'' +
                ", transparency=" + transparency +
                ", line=" + line +
                ", rotate=" + rotate +
                ", creatorId=" + creatorId +
                ", create_time=" + create_time +
                ", lastupdater=" + lastupdater +
                ", lastupdateTime=" + lastupdateTime +
                ", isDel=" + isDel +
                ", sydm='" + sydm + '\'' +
                '}';
    }
}
